<!DOCTYPE html>
<html lang="en">

<head>
	<!-- Required meta tags -->
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
	<!-- loader-->
	<link href="../static/assets/css/pace.min.css" rel="stylesheet" />
	<script src="../static/assets/js/pace.min.js"></script>
	<!-- Bootstrap CSS -->
	<link rel="stylesheet" href="../static/assets/css/bootstrap.min.css" />
	<!-- App CSS -->
	<link rel="stylesheet" href="../static/assets/css/app.css" />
</head>
<body class="bg-theme bg-theme1">
	<!-- wrapper -->
	<div class="wrapper">
		<div class="section-authentication-login d-flex align-items-center justify-content-center">
			<div class="row">
				<div class="col-12 col-lg-10 mx-auto">
					<div class="card radius-15">
						<div class="row no-gutters">
							<div class="col-lg-6">
								<div class="card-body p-md-5">
									<div class="text-center">
										<h3 class="mt-4 font-weight-bold">欢迎登录</h3>
									</div>


									<div class="form-group mt-4">
										<label>用户名</label>
										<input type="text" class="form-control" placeholder="请输入用户名"   id="username" />
									</div>
									<div class="form-group">
										<label>密码</label>
										<input type="password" class="form-control" placeholder="请输入密码"  id="password" />
									</div>

									<div class="btn-group mt-3 w-100">
										<button type="button" class="btn btn-light btn-block" onclick="login()">登录</button>
									</div>
									<hr>
									<div class="text-center">
										<p class="mb-0">还没有账号? <a href="register">注册</a>
										</p>
									</div>
								</div>
							</div>
							<div class="col-lg-6">
								<img src="../static/assets/images/login-images/login-frent-img.jpg" class="card-img login-img h-100" alt="...">
							</div>
						</div>
						<!--end row-->
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- end wrapper -->
</body>
<script src="../static/assets/js/jquery.min.js"></script>
<script>
    function login() {
        var data = {
            'username': document.getElementById('username').value,
            'password': document.getElementById('password').value,
        }
        $.ajax({
            url: "/",
            type: "post",
            data: JSON.stringify(data),
            success: function (e) {
                alert(e)
                if (e == "登录成功"){
                     location.href = 'look_data'
                }

            }
        })
    }
</script>

</html>